# from selenium import webdriver
# from selenium.webdriver.common.action_chains import ActionChains
#
#
# def element_dragging():
#     driver = webdriver.Chrome(r'./chromedriver.exe')
#     try:
#         url = "http://www.runoob.com/try/try.php?filename=jqueryui-api-droppable"
#         driver.get(url)
#         driver.implicitly_wait(5)
#         # 切换到元素所在的frame
#         driver.switch_to.frame("iframeResult")
#         # 起点
#         start = driver.find_element_by_id("draggable")
#         # 终点
#         end = driver.find_element_by_id("droppable")
#         actions = ActionChains(driver)
#         actions.drag_and_drop(start, end)
#         # 执行
#         actions.perform()
#         driver.close()
#     except Exception:
#         print("exception")
#         driver.close()
#
#
# element_dragging()
